From: Kenichi Handa Date: Mon, 26 Jul 2010 04:28:02 +0000 (+0900) Subject: font.c (Ffont_shape_gstring): Terminate GSTRING by nil if the number of glyphs gets... X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~7006^2~7 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=dbdc49e70bd5cd1d22bd1c2e2f8d760a0a603346;p=emacs.git font.c (Ffont_shape_gstring): Terminate GSTRING by nil if the number of glyphs gets smaller than the original length. --- diff --git a/src/ChangeLog b/src/ChangeLog index 0764339c085..8333e026120 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-07-26 Kenichi Handa + + * font.c (Ffont_shape_gstring): Terminate GSTRING by nil if the + number of glyphs gets smaller than the original length. + 2010-07-20 Juanma Barranquero * alloc.c (emacs_blocked_free, emacs_blocked_malloc) diff --git a/src/font.c b/src/font.c index cb3e9c5d326..ed4da9c75ac 100644 --- a/src/font.c +++ b/src/font.c @@ -4492,6 +4492,8 @@ created glyph-string. Otherwise, the value is nil. */) } if (i == 3 || XINT (n) == 0) return Qnil; + if (XINT (n) < LGSTRING_GLYPH_LEN (gstring)) + LGSTRING_SET_GLYPH (gstring, XINT (n), Qnil); glyph = LGSTRING_GLYPH (gstring, 0); from = LGLYPH_FROM (glyph);